This document shows how raw keycodes map to virtual keycodes on various keyboards.
It is an MPW text file.
Symbols used:
* indicates difference
- indicates n/a
KMAP 2 is used for the Apple Extended keyboard, KMAP 5 for the ISO Extended and KMAP 0 for the other ADB keyboards. Mac 128 Int'l, Mac 128 domestic and Mac Plus refer to the keyboard for that particular computer.
The differences to be noted are:
The virtual keycodes for the Control, Left cursor, Right cursor, Down cursor and Up cursor are different on the ADB keyboards from the non-ADB keyboards.
It is possible to reassign the virtual keycodes for Shift, Option and Control keys on the right side of the ADB keyboards. The reassigned keycodes are shown for these keys.
The Macintosh 128k International keyboard reassigns 16 raw keycodes to special keycodes using the itlc resource in the system. The values for these special keycodes are noted.
The ISO keyboards have an extra key which thus has an extra virtual keycode (0A).
The 'Enter' key on the main keyboard of the Macintosh Portable has a different virtual keycode ($34) from the 'Enter' key found on the numeric keypad of other keyboards($4C).
*KCHR Mappings*
This document shows the mapping from virtual keycodes to ASCII characters for different modifier key combinations using the US KCHR (0) resource found in the system.